<?php

namespace addons\TfFutures\common\models;

use common\enums\StatusEnum;
use common\helpers\ArrayHelper;
use Yii;

/**
 * This is the model class for table "rf_addon_tf_futures_lever".
 *
 * @property int $id
 * @property string $name 名称
 * @property string $desc 描述
 * @property double $profit 盈损配置
 * @property int $ratio 配资比率
 * @property int $interest 配资利息
 * @property int $cycle 配资周期
 * @property string $min 最低金额
 * @property string $max 最高金额
 * @property string $limit 最低余额
 * @property string $status 状态[-1:删除;0:禁用;1启用]
 * @property int $created_at
 * @property int $updated_at
 */
class Lever extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'rf_addon_tf_futures_lever';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['profit', 'min', 'max', 'limit'], 'number'],
            [['ratio', 'interest', 'cycle', 'created_at', 'updated_at'], 'integer'],
            [['status'], 'string'],
            [['name', 'desc'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '名称',
            'desc' => '描述',
            'profit' => '盈损配置',
            'ratio' => '配资比率',
            'interest' => '配资利息',
            'cycle' => '配资周期',
            'min' => '最低金额',
            'max' => '最高金额',
            'limit' => '最低余额',
            'status' => '状态[-1:删除;0:禁用;1启用]',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
